﻿using System.Collections.Generic;
using System.Text;

namespace pub.NET20Fix
{
    public static class Json
    {
        public static string Serialize(IDictionary<string, string> map)
        {
            var sb = new StringBuilder();
            sb.Append('{');
            foreach (var kvp in map)
            {
                if (sb.Length > 1)
                {
                    sb.Append(',');
                }
                sb.Append('"').Append(kvp.Key).Append("\":\"")
                        .Append(kvp.Value).Append('"');
            }
            sb.Append('}');
            return sb.ToString();
        }
    }
}